package org.ricks.actor;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class VirtualThreadDispatcher {
    private final ExecutorService executor = Executors.newThreadPerTaskExecutor(
            Thread.ofVirtual().name("actor-", 0).factory()
    );

    public void dispatch(Runnable task) {
        executor.submit(task);
    }
}